<%@page contentType="text/html; charset=UTF-8"  language="java"%>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>声明变量和方法</title>
</head>

<body>
    <%!
        //声明一个整形变量
        public int count;
        //声明一个方法
        public String info(){
            return "hello";
        }
    %>
     <%
         out.println(count++);
     %>
     <br/>
     <%
         out.println(info());
     %>
</body>
</html>